/* Badge Component Styles */
.myui-badge {
  position: relative;
  display: inline-block;
  line-height: 1;
}

.myui-badge-count {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  transform-origin: 100% 0%;
  z-index: 10;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  color: #fff;
  font-weight: normal;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
  text-align: center;
  background: var(--color-danger, #ff4d4f);
  border-radius: 10px;
  box-shadow: 0 0 0 1px #fff;
}

.myui-badge-dot {
  z-index: 10;
  width: 8px;
  height: 8px;
  background: var(--color-danger, #ff4d4f);
  border-radius: 100%;
  box-shadow: 0 0 0 1px #fff;
  padding: 0;
  min-width: auto;
}

.myui-badge-status {
  line-height: inherit;
  vertical-align: baseline;
}

.myui-badge-status-dot {
  position: relative;
  top: -1px;
  display: inline-block;
  width: 8px;
  height: 8px;
  vertical-align: middle;
  border-radius: 50%;
}

.myui-badge-status-success {
  background-color: var(--color-success, #52c41a);
}

.myui-badge-status-processing {
  background-color: var(--color-primary, #1890ff);
}

.myui-badge-status-default {
  background-color: var(--color-secondary, #d9d9d9);
}

.myui-badge-status-error {
  background-color: var(--color-danger, #ff4d4f);
}

.myui-badge-status-warning {
  background-color: var(--color-warning, #faad14);
}

.myui-badge-status-text {
  margin-left: 8px;
  color: var(--text-primary, rgba(0, 0, 0, 0.85));
  font-size: 14px;
}

/* Standalone Badge */
.myui-badge-not-a-wrapper .myui-badge-count {
  position: relative;
  top: auto;
  right: auto;
  transform: none;
  display: inline-block;
}

/* Dark Mode Support */
[data-theme='dark'] .myui-badge-count {
  box-shadow: 0 0 0 1px var(--bg-primary);
}

[data-theme='dark'] .myui-badge-status-text {
  color: var(--text-primary);
}
